<?php 
	namespace Home\Model;
	use Think\Model;
	class AddressModel extends Model{
		protected $_validate=array(
			array('address','require','收货地址不能为空'),
			array('receiver','require','收件人不能为空'),
			array('tel','require','电话号码不能为空'),
			array('postcode','require','邮编不能为空'),
			array('add_id','require','收货地址不能为空哦')
			);
		//添加
		public function getAdd($data)
		{//向地址表中插入，返回最后插入ID
			$res=$this->data($data)->add();
			//echo $res;exit;
			return $res;
		}

	}

?>